Dynamic adjustment of damping of a filter of an inverter

ABSTRACT

A power system including an inverter comprising an LCL filter is disclosed. The LCL filter includes a first inductor, a capacitor, and a second inductor. The power system further includes a controller. The controller is configured to determine an electrical characteristic of an output of the inverter. It is further configured to, based at least in part on the determined characteristic of the output of the inverter, dynamically adjust damping of the LCL filter.

CROSS REFERENCE TO OTHER APPLICATIONS

This application claims priority to U.S. Provisional Patent ApplicationNo. 63/315,487 entitled INVERTER CONTROL filed Mar. 1, 2022 which isincorporated herein by reference for all purposes.

BACKGROUND OF THE INVENTION

There are various challenges when designing inverters such as those thatconnect with PV (photovoltaic) solar panels and the utility grid.Examples of challenges for such inverters include those relating todistortion and instability.

BRIEF DESCRIPTION OF THE DRAWINGS

Various embodiments of the invention are disclosed in the followingdetailed description and the accompanying drawings.

FIG. 1 illustrates an embodiment of an electrical power system.

FIG. 2 illustrates an embodiment of an inverter.

FIG. 3 illustrates an embodiment of an LCL filter model and control.

FIG. 4 illustrates an embodiment of grid connected control.

FIG. 5 illustrates an embodiment of standalone control.

FIG. 6 is a flow diagram illustrating an embodiment of filter damping.

DETAILED DESCRIPTION

The invention can be implemented in numerous ways, including as aprocess; an apparatus; a system; a composition of matter; a computerprogram product embodied on a computer readable storage medium; and/or aprocessor, such as a processor configured to execute instructions storedon and/or provided by a memory coupled to the processor. In thisspecification, these implementations, or any other form that theinvention may take, may be referred to as techniques. In general, theorder of the steps of disclosed processes may be altered within thescope of the invention. Unless stated otherwise, a component such as aprocessor or a memory described as being configured to perform a taskmay be implemented as a general component that is temporarily configuredto perform the task at a given time or a specific component that ismanufactured to perform the task. As used herein, the term ‘processor’refers to one or more devices, circuits, and/or processing coresconfigured to process data, such as computer program instructions.

A detailed description of one or more embodiments of the invention isprovided below along with accompanying figures that illustrate theprinciples of the invention. The invention is described in connectionwith such embodiments, but the invention is not limited to anyembodiment. The scope of the invention is limited only by the claims andthe invention encompasses numerous alternatives, modifications andequivalents. Numerous specific details are set forth in the followingdescription in order to provide a thorough understanding of theinvention. These details are provided for the purpose of example and theinvention may be practiced according to the claims without some or allof these specific details. For the purpose of clarity, technicalmaterial that is known in the technical fields related to the inventionhas not been described in detail so that the invention is notunnecessarily obscured.

Described herein are embodiments of inverter control. Using thetechniques described herein, an inverter with a second order LCL filteris controlled such that harmonic distortion is reduced while instabilityis also reduced.

FIG. 1 illustrates an embodiment of an electrical power system. In theexample of FIG. 1 , the electrical power system includes an array ofphotovoltaic (PV) panels 102, and an energy storage system (ESS) 104. Asshown in this example, each of the PV panels is connected to acorresponding optimizer. The power optimizers are arranged in series. Inthis example, the ESS 104 includes inverter 106. The ESS also includesbattery modules 108, 110, 112, and 114. Each battery module includes abattery storage (or any other type of energy storage as appropriate) anda DC-DC converter. The inverter connects to the electrical wiring of asite (e.g., home site). The inverter is also connected to grid 116(e.g., utility grid). In the example shown, a set of relays (118) isbetween the inverter and the grid, allowing control of whether theinverter is connected to the grid (where the inverter is then referredto as operating in a “grid-tied” or “grid-connected” mode), ordisconnected from the grid (where the inverter is then referred to asbeing in a “standalone” mode). In this example, the inverter includescontroller 128, which is configured to provide damping control of theinverter in both grid-tied and standalone scenarios. Further detailsregarding controller 128 and damping are described below.

In the example of FIG. 1 , the inverter is of a split bus architecture,where the inverter DC (Direct Current) bus at the input of the inverteris split into two halves, a positive half of the DC bus 120 (DC_Bus+),and a negative half of the DC bus 122 (DB_Bus−). As shown in thisexample, the positive half of the DC bus (120) is connected to an outputterminal of the “top” optimizer 124, and the negative half of the DC bus(122) is connected to an output terminal of the “bottom” optimizer 126.

FIG. 2 illustrates an embodiment of an inverter. In some embodiments,inverter 200 is an example of inverter 106 of FIG. 1 . In this example,the inverter is a voltage source inverter topology, where the inverterincludes a voltage source mechanism. In the example shown, the inverteris a split phase inverter with a neutral balancing leg. In the exampleof FIG. 2 , the inverter is tied to the grid 232 (e.g., relays 118 areclosed).

In this example, in which the inverter is used in conjunction with asplit bus architecture, the inverter DC bus includes two capacitors (202and 204) in series, with a midpoint connected to AC neutral (206). Insome embodiments, as shown in the example of FIG. 1 , the inverter isincluded in a power system that includes an energy storage system (ESS)that, for example, includes battery modules. In some embodiments, thebattery modules in the system connect to one capacitor or the other (202or 204). In the example system of FIG. 1 , two battery modules areconnected to each half of the bus. In some embodiments, the balancer leg234 (which includes switches S5 and S6 and inductor Ln) of the inverteris a third phase that is connected directly to the midpoint of the bus.The balancer leg is used, for example, to hold the midpoint of the busat half the voltage of the bus. In some embodiments, the balancer legachieves this by moving current from the top half to the bottom half, orvice-versa, in order to regulate the two halves to be equal to eachother.

In this example, the split phase inverter includes two LCL(inductor-capacitor-inductor) filters. For example, the first LCL filter(206) includes inductor L1 (208), capacitor C2 (210), and inductor L2(212). The second LCL filter (218) includes inductor L11 (220),capacitor C1 (222), and inductor L22 (224). As shown in this example,the input to the LCL filter 206 is controlled via switches S1 (214) andS2 (216), and the input to the LCL filter 218 is controlled via switchesS3 (226) and S4 (228)

Each of the LCL filters has an output that connects to the grid (wherethere may be a relay between the outputs of the inverter and the grid,as shown in the example of FIG. 1 ).

In the example of FIG. 2 , the inverter includes two portions, asquare-wave generation portion, and a sine-wave generation portion(which is configured to convert the square-wave into a sinusoidal waveby removing or filtering out higher frequency components). Consideringone leg of the inverter, the manipulation of switches S1 and S2 resultsin a high frequency square waveform at 230. In this example, the outputof the inverter is a high frequency square PWM (pulse-width-modulated)wave form. This voltage wave form is not sinusoidal, and the current maynot be exactly sinusoidal. In this example, an LCL filter is used toconvert the square wave to, for example, a sinusoidal wave (e.g., byremoving or filtering out various frequencies or harmonics).

In order for the inverter to be connected to the grid or a load, theremay be standards with requirements that dictate the characteristics ofthe output of the inverter. For example, in order to connect theinverter to a load or the grid, one requirement is that thevoltage/current waveform be sinusoidal, and that the total harmonicdistortion (THD) of the current wave form be below a threshold (e.g.,5%). With this requirement, the current wave form should be sinusoidal(and not a square wave form or some other arbitrary wave form). The LCLfilter is configured to, for example, “clean” the current and eliminatethe high frequency components of the square wave (that are not the 60 Hzcomponent specified in the United States). For example, the 60 Hzcomponent is boosted, and the high frequency components are filteredout.

For example, the output voltage of the square wave generation portion ofthe inverter is an input to the LCL filter made up of L1, C2, and L2.The LCL filter is used to convert the high frequency square waveforminto an AC sinusoidal waveform (e.g., 60 Hz AC sine wave, that matchesgrid current and that is in a form deliverable to a home). The frequencyof the AC waveform is determined by the resonant frequency of the LCLfilter. Thus, as shown in this example, the inverter output voltage(square wave) is connected and converted through the LCL filter to thegrid.

Due to ringing of the frequency into the 60 Hz AC waveform however, theinverter system may become unstable. For example, in a grid-connectedsystem, the inverter may be considered as one voltage source, and thegrid to be another voltage source, where there are thus two voltagesources connected via the LCL filters (where the two voltage sourcesshould not be directly connected together). Even a small change incurrent may result in instability, where a high current flows into thegrid or out of the grid. In a standalone system, there is one voltagesource, which is the inverter voltage source. While the grid is notconnected, the loads on the inverter will be the electrical loads beingserved by the inverter (e.g., resistive loads in the house). In thestandalone case, the current is limited by the inverter. However, in thegrid-connected scenario, the current flowing into or out of the systemis not limited by the inverter (as it will also be dependent on gridvoltage, which may fluctuate). Rather, instability may result in thegrid providing a large amount of current that may damage the inverter.

The damping techniques described herein stabilize the behavior of theinverter system, preventing oscillations and ringing. For example, asdescribed above, the instability may result in large amounts of currentinto the inverter system, damaging components such as the switches. Thedamping described herein prevents, for example, oscillations or ringingin the current flowing between the input and output of the LCL filter(between the output of the switches and the grid).

While the inverter shown in the example of FIG. 2 is grid-tied (e.g.,relays 118 are closed, and the inverter is connected with the grid),there may still be instability when the inverter is operating in astandalone mode and the inverter is disconnected from the grid (thoughlikely to be smaller relative to the instability experienced whengrid-tied), and the damping techniques described herein may also beapplied when in such a standalone mode to dampen any oscillations orringing.

Further details regarding the LCL filter and its control are describedbelow. While embodiments of inverter control are described herein withrespect to a single LCL filter for purposes of clarity, the controltechniques described herein apply to both LCL filters of the invertershown in FIG. 2 .

In contrast to the LCL filters of the inverter described herein, someexisting inverters include LC filters. However, there may be variousissues with using LC filters. For example, large values of inductance(L) and capacitance (C) (which in turn involve physically largecomponents) may be needed in order to reduce the total harmonicdistortion (THD) of the current (in order to produce, for example, asmooth sine wave).

In this example, rather than using a first order filter such as an LCfilter, an LCL filter, a type of second order filter, is used. The useof an LCL filter has various benefits. For example, small values for Land C (and thus physically smaller components) may be used in order toremove harmonics. The LCL filter also has a higher roll-off frequency,with a sharp cutoff frequency.

While the LCL filter allows for the use of smaller components, thesecond order nature of the transfer function between the output and theinput of the inverter may be more prone to instability. For example, asdescribed above, once connected to the grid, the grid current may not bestable. While the inverter is grid tied, if the voltage on the grid wereperfectly sinusoidal, the filter may operate stably. However, the gridvoltage is likely to have various imperfections, which may cause thefilter to ring and oscillate. For example, given the instability of thefilter, any imperfection in the sine wave of the grid (or imperfectionsin the switching side) may cause oscillations, which could result inringing being exhibited in the currents on the output of the filter. Forexample, there may be ringing voltages in the resonant capacitors. Asone example, there may be various overshoots in the current, which mayintroduce an oscillation in the current waveform being outputted by theLCL filter (which will be impacted by the grid voltage, which mayfluctuate unpredictably).

As described above, the LCL filter is used to provide smooth currentinto the grid. The use of an LCL architecture allows a large amount ofsmoothness for much less inductance (as compared to using a single largeinductor, such as in the case of an LC filter), but with a potentialside effect of ringing and oscillating due to the interaction of theinductances and capacitances (as well as imperfections in switches, gridvoltage, etc.).

Described in further detail below are embodiments of a damping system toreduce such oscillations in the current waveform outputted from the LCLfilter (so that a smooth and stable sinusoidal current waveform isproduced). Using the inverter control and damping techniques describedherein, an optimized filter is provided, in which smoothness is providedwith the filter, while the side effect of oscillation is also reduced.That is, using such an optimized and damped filter as described herein,when synchronizing with the grid, rather than using a large inductor(which may be expensive and physically large and take space), a secondorder LCL filter with smaller inductors may be used that is also dampedusing the control techniques described herein to prevent oscillationswhen the signal on the grid has variants. This allows the use of asmoothing filter architecture that is stable, even when using smallinductors in a second order filter configuration.

While examples involving voltage source inverter topologies aredescribed herein for illustrative purposes, the damping techniquesdescribed herein may be applied to any other type of inverter topologythat includes an LCL filter. Further, while examples involving a splitphase inverter are described herein for illustrative purposes, thecontrol techniques described herein may be variously adapted toaccommodate any other type of inverter that includes an LCL filter.

FIG. 3 illustrates an embodiment of an LCL filter model (310) and gridcurrent control (320) using PI (Proportional-Integral) control, alongwith damping control. In this example, the LCL filter of an inverter ismodelled according to KVL (Kirchhoff's Voltage Law) analysis, as appliedto the example inverter of FIG. 2 . For example, KVL analysis isperformed on the inverter circuit of FIG. 2 to implement the model 310of the inverter. For illustrative purposes, in the example of FIG. 3 ,the LCL filter model 310 is a model of the LCL filter 206 of FIG. 2 thatincludes L1, L2, and C2 (where the embodiments described herein alsoapply to the other LCL filter of FIG. 2 that includes L11, L22, and C1).In the example of FIG. 3 , “e” (318) is grid voltage. An example of atransfer function for the damping is provided below. In this example,the damping transfer function is a second order transfer function, whichis used to implement a virtual series RLC circuit in series withcapacitor C. That is, in some embodiments, damping is provided byemulating a virtual impedance (e.g., virtual resistance) in series withthe capacitor of the LCL filter, where this emulated impedance isdynamically adjustable, allowing, for example, THD to be tuned to withinan acceptable range. This addition of impedance has multiple benefits:

1. It stabilizes the LCL filter transfer function with damping impedance

2. With respect to variation, the filter inductance value (i.e., L1 andL2 of FIG. 2 ) of the damping impedance can be tuned to reduce the THDin the current that is output from the filter and to also obtain a widerange of stability for wide variation in filter inductance.

Wide variation of filter inductance may be due in part to the fact thatinductance is a function of current, where at higher current, theinductance of the filter reduces (that is, the inductances are not fixedvalues, but may change with different amounts of current). Therefore,the techniques described herein may be used to ensure stability andlower THD in grid current even as inductance changes.

In some embodiments, the voltage across the virtual impedance (currentthrough capacitor multiplied by virtual impedance value) describedherein is subtracted from a voltage reference to the inverter, which inturn is equivalent to an impedance connected in series with capacitor C(e.g., capacitor C1 or C2 of FIG. 2 ).

$\frac{i_{g}}{v} = \frac{\frac{1}{Ls}\left( {s^{2} + {\frac{R_{d}(s)}{L_{g}}s} + z_{LC}^{2}} \right)}{s^{2} + {\frac{L_{I} + L_{g}}{L_{inv}L_{g}}R_{d}s} + w_{res}^{2}}$

In this example, the transfer function between the current at the pointof the output of the LCL filter (which is also a function of the gridcurrent) (ig in the above transfer function) over the voltage at theinput of the LCL filter (v in the above transfer function) iscalculated, for example, using a Laplace transform.

The following is an example of the transfer function for the dampingalgorithm:

$R_{d} = \frac{R}{\left( {1 + {a_{0}s} + {a1s^{2}}} \right)}$

(The R_(d) here is the same as the Rd in the ig/v transfer functionabove). In this example, R_(d) is equal to R divided by (1+a₀s+a₁s²)

In some embodiments, the damping algorithm is implemented in acontroller (e.g., via firmware) as shown in the example of FIG. 3 (e.g.,at Rd(s) 302). In some embodiments, the controller is an example ofcontroller 128 of FIG. 1 . In some embodiments, the controller isconfigured to control the inverter to behave as if there were a resistorin series with the capacitor of the LCL filter. In some embodiments,capacitor current (ic, 304) is measured and passed through as an inputto damping impedance (Rd(s), 302), where it is then subtracted from thereference voltage to the inverter. For example, the voltage resultingfrom ic through Rd is used to determine the duty cycle for the PWMmodulator for modulating the switches that generate the square wavevoltage output. This in turn affects what the output current ig (314)will be (according to the transfer function). In this way, the gridcurrent is controlled in a manner as if there were the virtualresistance in series with the capacitor of the LCL filter.

As described above, the damping algorithm is implemented, in someembodiments, in a controller such as a microcontroller. In variousembodiments, the microcontroller is used to implement various aspects ofa control system, such as the PI controllers, PR controllers, etc.,further details of which are described below.

In some embodiments, the algorithm is dynamically adjustable. Forexample, the parameters R, a0, and a1 may be adjusted to affect Rd (andultimately affect grid current). This is in contrast to using a constantparameter for damping (e.g., a fixed damping factor). Rather, using thetechniques described herein, online and dynamic tuning is able to beperformed. For example, the parameters of the damping are dynamicallyvariable according to the load, electrical characteristics of the filteroutput (e.g., Total Harmonic Distortion), as well as with respect toparameter variation (e.g., variation of inductance and/or capacitancethat may occur over time).

As will be described in further detail below, a0 and a1 may be adjustedto account for variation in component values, such as changes ininductance values either due to component variation over time, or due tovarying amounts of current going through the inductors (which wouldaffect their inductance value). For example, rather than having only the“R” factor, the a0 and a1 weights are parameters corresponding to “s”terms, in which case the damping algorithm is a transfer function thatis usable for accounting for flexibility in the filter component values.In some embodiments, the values a0 and a1 are dynamically tuned, alongwith R, to take into account filter component variation. Further detailsregarding accounting or compensating for filter component variation aredescribed below.

In some embodiments, when the damping algorithm is running, the gridcurrent is measured via a current sensor at the output of the LCLfilter. A current sensor is also placed at the capacitor to determinethe current going through the branch of the LCL filter with thecapacitor. Using the damping techniques described herein, the invertervoltage (high frequency square waveform 230) is controlled to obtain thedesired grid current (through inductors L2 and L22).

As shown in the above examples, and via KVL (Kirchoff s Voltage Law)analysis, by having Rd defined in the manner described above, and byinjecting ic*Rd into the control of the inverter by subtracting theproduct of ic*Rd (which is a voltage) from the output of the PIcontroller, this results in a behavior that emulates what would occur ifRd were connected in series with the capacitors C1 or C2 (e.g., the ig/vtransfer function described above).

In some embodiments, a portion of the transfer function in the controlloop is a PR (Proportional-Resonant) controller, which may be given as

$G_{PR} = {K_{p} + \frac{2k_{i}s}{s^{2} + w^{2}}}$

Where w=2πnf

where n is a harmonic number of fundamental frequencies. For example,“n” represents the harmonics of the fundamental 60 Hz frequency (e.g.,60 Hz, 120 Hz, 180 Hz for harmonic numbers 1, 2, 3, etc.).

where f is fundamental frequency.

Below is an embodiment of a pseudocode implementation

//// calculate error between reference current (igref, 306) and actualinverter grid current (igmeasured 308)e(k)=Iref−I2

In some embodiments, the reference current is part of a higher levelcontrol system (e.g., for active and reactive power control). As oneexample, Iref is a desired grid current (e.g., 60 Hz sine wave). I2 isthe actual measured grid current.

///// calculate damping

${Kd} = {\frac{1}{b_{o}}\left\lbrack {{a_{1}{{Ic}(k)}} - {a_{1}{{Ic}\left( {k - 2} \right)}} - {b_{1}K{d\left( {k - 1} \right)}} - {b_{2}K{d\left( {k - 2} \right)}}} \right\rbrack}$

//// calculate inverter voltage reference

${vref} = {{\frac{1}{b_{o}}\left\lbrack {{a_{1}{e(k)}} - {a_{1}{e\left( {k - 2} \right)}} - {b_{1}vre{f\left( {k - 1} \right)}} - {b_{2}vre{f\left( {k - 2} \right)}}} \right\rbrack} - {Kd}}$

/// calculate PWMduty=vref*Vbusinv

The PWM duty cycle, which is determined by the duty above (which is inturn determined by Kd, the calculated damping) is then used to controlswitches such as the pair of S1 and S2 (214 and 216) to control thesquare wave that is an input to LCL filter 206, and S3 and S4 (226 and228) to control the input to LCL filter 218, as will be described infurther detail below. In this way, the output current of the inverter iscontrolled as a function of the measured current through the capacitorof the LCL filter, via the transfer function of the damping algorithmdescribed above. This provides a form of feedback in the inner currentcontrol loop to determine how to control the input to the LCL filter toproduce a desired output grid current (e.g., with a desired THD, orbelow a THD threshold).

In the above example, Kd is the product of Ic and Rd (Rd multiplied byic, the current through the capacitor), and is a voltage value that issubtracted from the voltage reference and error to result in a dutycycle for the PWM controller/modulator for controlling the inverterswitches.

In some embodiments, the grid current control is implemented in a microcontroller (e.g., controller 128 of FIG. 1 ).

Embodiments of Grid Connected Control

FIG. 4 illustrates an embodiment of grid connected control. The exampleof FIG. 4 illustrates an embodiment of a control architecture for a gridconnected system (e.g., inverter is connected to the grid). Ingrid-connected mode, a current source architecture is shown, where gridcurrent is to be controlled. As shown in this example, damping of LCLfilters 206 and 218 is controlled by control 402 and control 404,respectively. In some embodiments, each of grid-connected controlsystems 402 and 404 are embodiments of the grid current control 320shown in the example of FIG. 3 .

In the example described herein, the control architecture includes a DClink voltage loop and inner grid current control. In some embodiments,the outer voltage loop attempts to keep the input DC link voltage (DCbus voltage, which includes DC_Bus+ and DC_Bus− at input to theinverter) to a regulated value. In some embodiments, if there isadditional power available at the input of the inverter, the currentreference from the outer voltage loop increases. In some embodiments,the inner loop is a current controller with damping, and is anembodiment of the grid current control 320 shown in the example of FIG.3 . In some embodiments, proportional-resonant (PR) control is used andtuned at multiple frequencies (e.g., fundamental, third harmonic, etc.)to reduce the harmonics in grid current (e.g., via PR1 404, PR3 406, andPR5 408). The PR controllers are used to reduce harmonics of the 60 Hzfundamental frequency (e.g., 120 Hz, 180 Hz, etc.) in the grid current.In some embodiments, the output of the current controller is subtractedfrom the damping impedance multiplied by capacitor current to emulate animpedance that is connected in series with the filter capacitor.Similarly, in this example, there is a current control loop for otherphase(s) of the inverter along with the damping loop.

In this example, Kd(s) (which is equivalent to, or the same as Rd(s)*icabove) is used to implement a damping algorithm (e.g., to performdamping calculations), as described above.

In some embodiments, Kd(s) (which may be implemented as amicrocontroller or other type of processor) takes as input the measuredvalues of the current on the capacitors of the LCL filters, referred toin this example as Ic1 (current on C1 of FIG. 2 ) and Ic2 (current on C2of FIG. 2 ). In some embodiments, the current on the capacitors of theLCL filters is determined using direct sensor readings (e.g., withcurrent sensors placed at the capacitors).

In this example, the damping unit is configured to provide as output asignal that indicates to the inverter what voltage to add to its outputvoltage, to effectively damp the LCL filter.

For example, by measuring the capacitor current, the damping algorithmcalculates or otherwise determines an adjustment to the inverter voltage(e.g., by controlling the PWM block, which controls the square wave thatis generated and provided as input to the LCL filters). In someembodiments, the determined adjustment is added to the inverter in realtime to effect the desired damping of the LCL filter.

In some embodiments, the damping coefficients of Kd(s) (e.g., theparameters R, a0, and/or a1 of Rd(s) above), implemented via themicrocontroller, provide a control system that may be dynamicallyadjusted to reduce oscillations in the current waveform. For example, insome embodiments, the electrical characteristics of the current at theoutput of the LCL filter are determined. For example, the THD of theoutput current is determined. If the current waveform is determined tohave a THD that is out of bounds (e.g., greater than 5%), then the Rdtransfer function is tuned by adjusting the R, a0, and/or a1 parametersof the transfer function such that THD is brought within specification.As another example, the parameters may be tuned based on variation ofinductance and/or capacitance values, which may vary based on age, as afunction of current, etc. For example, the current through an inductoris determined. Based on the current, the inductance of the inductor isdetermined (which may vary as a function of the current passing throughit). To compensate for the change in inductance value at that current,one or more parameters of the Rd transfer function are adjusted. Asanother example, the inductance value for an inductor may change withage. In some embodiments, the controller is provided a lifetime modelfor the LCL filter components, which models, at various ages, the valuesfor the LCL filter components. Based on the current age of the LCLfilter components, the parameters of the Rd(s) transfer function aredynamically adjusted to compensate for the current age of thecomponents. In other embodiments, the inductance and/or capacitancevalues of the LCL filters are periodically measured to determine theircurrent values. The Rd(s) function parameters are then adjusted based onthe current values for the LCL filter components. Further detailsregarding accounting for filter component variation are described below.

In this way, the damping of the LCL filter is dynamically adjusted overtime and usage, and is not fixed, for example, after manufacturing time.

As one example of performing damping, the capacitor current (e.g., C1 orC2 in the LCL filters of FIG. 2 ) is measured. In some embodiments, thecapacitor current (Ic1 for the capacitor C1) is transferred throughKd(s). In some embodiments Kd(s) is implemented as a PI (proportionalintegral) controller, as described above.

As described above, the damping is implemented by emulation of a virtualimpedance in series with the capacitor of the LCL filter. This is incontrast to implementing damping by adding a physical resistor in serieswith the capacitor (e.g., a resistor in series with C1, and a resistorin series with C2 of FIG. 2 ). The addition of a series resistance isanalogous to adding a shock absorber to a car. The addition of thephysical resistor would provide a drag on the system, damping out anyoscillations, and preventing the system from oscillating.

While adding physical resistors would reduce oscillations, addingphysical resistors to the capacitors will incur a large power loss, asthe physical resistor would draw a large amount of electrical power andgenerate a large amount of heat, resulting in large inefficiencies.

In some embodiments, to avoid the use of a physical resistor and thelarge power losses and inefficiencies described above, the effect of thephysical resistor on the LCL filtering is emulated by the dampingalgorithm described above, which emulates a virtual type of resistor, asdescribed above. For example, an IR drop is introduced virtually, andfed into the control loop. In this way, the damping control schemealters the operation of the inverter to produce a same effect of theaddition of a physical resistor, but without actually requiring addingin of a physical resistor. In some embodiments, the damping controlalgorithm continuously computes (e.g., periodically, such as every 100microseconds) what would be occurring were a resistor in series with thecapacitor of the LCL filter. In some embodiments, the damping algorithmcomputes a compensation to apply to the inverter (e.g., by controllingthe PWM modulator, which determines how switches S1 and S2, or S3 and S4are switched on/off) to cause, for example, the currents in the systemto follow in a manner as if there were a resistor in series with thecapacitance. This results in the inverter behaving as if there werephysical resistors in series with the capacitors of the two LCL filters.

In some embodiments, the damping algorithm (Kd(s)) is implemented as aPI controller with a virtual R (resistor), as described above.

Thus, in some embodiments, the transfer function of the dampingalgorithm effectively incorporates a virtual series resistance into thecapacitor in order to mimic the behavior of a physical resistor inseries with the capacitor.

The following are further details regarding emulating the behavior of aresistor in series with the capacitor of an LCL filter. As describedabove, in some embodiments, the current through the capacitor ismeasured (e.g., by using current sensors at the capacitors C1 and C2).Resistors have a voltage that is proportional to current. In someembodiments, by measuring that current directly, it may be determinedthat, if there were a resistor in series with the capacitor, there wouldbe a certain amount of voltage drop in that leg of the circuit that isresistance times the current that is measured. In this way, the expectedbehavior of a physical resistor in series with the capacitor may becomputed, which the damping algorithm then attempts to emulate.

In some embodiments, the damping algorithm is a portion of a controlscheme, such as that shown in the example of FIG. 4 . In the example ofFIG. 4 , the control system includes PR1 (404), PR3 (406), and PR5(408), which may be used as inputs to the PWM (pulse-width modulation)block to reduce harmonics (e.g., first, third, and fifth harmonics at 60Hz, 180 Hz, and 300 Hz, respectively, in this example). In someembodiments, the damping algorithm operates in parallel of controllingthe main current. In the example of FIG. 4 , the output of the dampingalgorithm Kd(s) is a signal that is added (or subtracted) to the PWM(pulse-width modulation) voltage block. In some embodiments, the outputof the PWM block is then used to control the switches on the inverter,S1 (214) and S2 (216). For example, the PWM modulator block sends on/offsignals to the switches, turning them on or off. As one example, thedamping algorithm Kd(s) computes the voltage to apply to the filter,such as at the output of S1 and S2, or the output of S3 (226) and S4(228). In some embodiments, the PWM modulator block uses thatinformation to calculate the duty cycle that the switches should be onor off at in order to achieve the desired voltage to apply to thefilter. In some embodiments, the PWM modulator block then sends theon/off signals to the switches according to the duty cycle calculatedbased at least in part on the signal outputted from the Kd(s) dampingalgorithm.

As shown in this example, the actuation of the switches of the inverteris controlled in part by the damping algorithm in order to damp theoscillations of the filter so that it does not ring uncontrolled. Thatis, the filtering performance and characteristics of the LCL filter(e.g., its transfer function between the output and the input of the LCLfilter) are controlled via a form of feedback between the output of theLCL filter and the input of the LCL filter (which is the square waveform generated by the switches controlled by the PWM). For example, thedesired output current of the LCL filter (e.g., with a THD below athreshold) is achieved by modulating the input of the LCL filter toproduce the desired output current. The square waveform that is an inputof the LCL filter is determined based on the duty cycle computed by thePWM controller. The duty cycle computed by the PWM controller isdetermined in part based on Kd(s), which is a function of emulatedimpedance or resistance multiplied by the measured current through thecapacitor of the LCL filter. Via the KVL analysis described above, themeasured current through the capacitor of the LCL filter is determinedas a function of the output current. In this way, a portion of theoutput current of the LCL filter is used, in conjunction with thedynamically variable Rd(s) virtual impedance, control of the PWM, etc.to control the input to the LCL filter to result in the desired outputcurrent.

Using the damping techniques described herein, a higher order filtersuch as a second order LCL filter that has small inductances, may beused that is also stable.

Emulation of the behavior of a series resistance on a capacitor may beimplemented for various types of inverter architectures and controlschemes. For example, with a voltage source control scheme, the outputof the damping algorithm may be used to inject or add a compensationvoltage (e.g., as shown in the grid-connected and standalone controlshown in the examples of FIGS. 4 and 5 ).

As another example, consider, for example, a current sourcearchitecture. Suppose that current control is implemented on the primaryinductors (e.g., the primary control loop is on the primary inductors L1and L11 instead of the secondary inductors L2 and L22 In someembodiments, the virtual resistance (in series with the capacitor of anLCL filter) may be implemented with a current control approach. As oneexample, current control may be implemented by adding compensationbefore a reference current (and, for example, modifying currentreferences). In some embodiments, the reference current (e.g., Iref) isthe desired value of current to flow to the grid. In some embodiments,the damping algorithm is configured to calculate an addition to thecurrent references to create a desired damping effect, but throughcurrent source techniques.

While the above embodiments of damping techniques have been described inthe context of a grid connected system for illustrative purposes, thedamping techniques described herein may be variously adapted toaccommodate other scenarios, such as when the inverter is operating in astandalone manner (and not connected to the grid, such as in a backupmode). For example, even when in a backup mode, and off grid, there maybe loads that can cause instability of the filter, where the dampingtechniques described herein may be used to dampen any such oscillations.Embodiments of standalone control are described below.

Embodiments of Standalone Control

FIG. 5 illustrates an embodiment of standalone control. In someembodiments, standalone control is used in scenarios when the inverteris not connected to the AC supply grid (e.g., during microgridoperation, or during power cuts). In standalone mode, a voltage sourcetype of architecture is shown, where the AC output voltage iscontrolled, and the inner loop is a current control loop. In someembodiments, the inverter is operated in such a way that it controlsoutput AC voltage. FIG. 5 illustrates an embodiment of standalonecontrol of a split phase inverter (such as that shown in the example ofFIG. 2 ). In some embodiments, the standalone control includes an outeroutput voltage control loop that is used to control the output voltageto, for example, 120V AC RMS. In some embodiments, the output of the ACvoltage loop is given to the inner current loop as a reference gridcurrent. In this example, the inner current loop is an embodiment of aPR controller to reduce first, third, and fifth harmonics in thecurrent. In some embodiments, output of the current controller issubtracted with damping impedance multiplied by filter capacitorcurrent.

In the case of standalone control, there may still be instability in thewaveform of the current provided by the inverter to loads in a site suchas a house to which the inverter is providing power. Similarly to asdescribed above in the grid-connected scenario, if the current waveformis determined to have a THD that is out of bounds, then the Rd transferfunction is tuned by adjusting the R, a0, and/or a1 parameters of thetransfer function such that THD is brought within specification. Theparameters for Rd(s) may also be adjusted dynamically to adjust forfilter component variation (e.g., due to degradation over time, theamount of current flowing through a component, etc.). Further detailsregarding accounting for filter component variation are described below.

Accounting for Filter Component Variation

Parameter variation of components such as inductances and capacitancesmay have a large impact on THD. Consider that an inverter may have anexpected operating lifetime of 20 years. Over the 20 years, theinductance of an inductor in the LCL filter may degrade. The capacitanceof the capacitor in the LCL filter may also degrade significantly. Withdegradation over a period of time, THD will increase. However, using thetechniques described herein, even with component degradation, THDincrease is mitigated by having a variable damping factor, where thevarious parameters of the damping factor (e.g., R, a0, and a1 of Rd(s)described above) may be dynamically tuned over the life of the inverterto account for such variation.

Further, as described above, the inductance of inductors such as L1, L2,L11, and L22 are a function of current, which results in another exampleof variation of LCL component values. For example, suppose an inductoris designed to have a certain inductance at 60 A (amps). However,suppose that 70 A is being passed through the inductor at a givenmoment. The inductance value of the inductor will decrease. If theinductance value is decreased, then harmonics will increase. TotalHarmonic Distortion then increases, and may go out of bounds ofrequirements (e.g., greater than 5%). The inductance value of theinductor may also change over time due to component degradation orvariation over time as described above.

In some embodiments, to dynamically determine the amount of damping toapply (e.g., to determine what the R, a0, and a1 parameters should beupdated to in order to bring THD within specification), a controllerimplementing damping of the LCL filter of the inverter (e.g., controller128, used to implement the grid-connected and standalone control schemesdescribed above) is configured to perform a function such as a Fouriertransform on the output current waveform. The Fourier transform is usedto determine the THD of the output current. The parameters of thedamping factor are tuned or adjusted according to the determined THD,which may change over time (or due to the changing current through thecomponents). For example, the R, a0, and a1 values are tuned in responseto determining that THD is out of bounds (e.g., THD is greater than 5%,or any other threshold as appropriate). In some embodiments, the valuesof R, a0, and a1 are determined by performing a stability analysis ofthe system.

In some embodiments, the component variation over time is modeled. Forexample, reliability testing is performed on the inductors andcapacitors of the LCL filters. The reliability testing is used todetermine a model of the components that predicts the capacitance orinductance of the LCL filter components over a period of time. Forexample, the model may be used to estimate the capacitance of thecapacitor in the LCL filter at the first year, at five years, etc. Thesecomponent values are stored in the microcontroller, along with theexpected time at which those component values are predicted. The age ofthe inverter system is also recorded. The inverter controller then usesthese values, along with the age of the system (which in turn is used todetermine the age of the components of the LCL filter), to tune theparameters of the damping transfer function over time (e.g., accordingto the component degradation model, which indicates component valuespredicted over the course of several years).

In this way, dynamic, online parameter tuning is performed to meetrequirements (e.g., THD requirements), and component degradation overtime may be compensated for to produce a current that is withinrequirements or specifications.

Thus, if the control system is a fixed damping factor as in existingsystems, which is designed for a specific inductance value (that is, forexample, rated at a certain current), then it may be less effective indamping instability when there is variation in the inductance value. Incontrast to being fixed, the damping techniques described herein providea dynamically tunable control system that is capable of beingdynamically tuned for variation in inductance values and allowing forvarious operating margins.

As described above, a processor, such as a microcontroller is used toperform control of the inverter. This includes determining the dutycycle for the PWM modulator. The duty cycle for the PWM modulator iscontrolled in a manner to produce a grid current (e.g., in gridconnected case) that would result if a resistance (Rd) were in serieswith the capacitor current. This reduces instability.

As described above, the resistance Rd is emulated in themicrocontroller. The transfer function for Rd is described above. Asalso described above, the parameters for Rd, such as R, a0, and a1 inthe damping algorithm above can be dynamically adjusted via themicrocontroller. For example, the parameters of Rd may be dynamicallyadjusted to modify the amount of total harmonic distortion in the gridcurrent (e.g., to reduce it or otherwise bring it within specification).This is an improvement over existing control systems, in which thedamping is not dynamically variable and cannot be changed after initialprogramming (i.e., the damping is fixed). Here, rather than the dampingfactor being a fixed resistance, Rd here is a higher order transferfunction that can be dynamically tuned via adjustment of variousparameters (e.g., R, a0, and a1) by the software/firmware of themicrocontroller.

Using the techniques described herein, the damping factor Rd may betuned in an online manner to meet THD requirements (e.g., to keep itbelow 5%, or below any other threshold as appropriate), even in the faceof component variation over time. For example, the amount of dampingthat is implemented is controlled to compensate for variation in theinductance value.

As one example, suppose, in some cases, the PI values are fixed, but theTHD is greater than a threshold requirement (and is out of spec). Insome embodiments, the parameters of the damping factor Rd(s) are tunedto reduce the THD to be within specification. In some embodiments, thesystem includes a current sensor to measure the grid current. Thecontrol system is configured to measure the THD of the grid current. Themicrocontroller determines whether the THD is above or below a thresholdvalue. If the THD is above the threshold value, the microcontrolleradjusts the parameters (e.g., R, a0, and/or a1) of the Rd(s) transferfunction accordingly until the THD of the measured grid current is belowthe 5% threshold (or any other threshold as appropriate). In this way,the damping control algorithm dynamically determines the input toprovide to the PWM controller (e.g., to determine a duty cycle) tocontrol the switches to adjust the input voltage to the LCL filter suchthat the grid current at the output of the LCL filter is within the THDspecification or requirements. As one example, the control logic isimplemented in a computing language such as C (other computing languagesmay be used, as appropriate). In some embodiments, the damping isdynamically adjusted in response to variation of grid impedance.

FIG. 6 is a flow diagram illustrating an embodiment of filter damping.In some embodiments, process 600 is executed by controller 128 of FIG. 1. As described above, in some embodiments, controller 128 is used toimplement the control mechanisms described herein, such as grid currentcontrol 320 of FIG. 3 , grid connected control 402 and 404 of FIG. 4 ,and the standalone-mode control of FIG. 5 .

The process begins at 602 when an electrical characteristic of an outputof an inverter including an LCL filter (a second order filter made up oftwo inductors and a capacitor) is determined. For example, a THD of thecurrent at the output of the inverter is determined. The inverter may beeither grid connected or standalone (disconnected from the grid).

At 604, based at least in part on the determined electricalcharacteristic of the output of the inverter, damping of the LCL filteris dynamically adjusted. As one example, damping of the LCL filter isimplemented by emulating a virtual resistance in series with a capacitorof the LCL filter. As one example, the virtual resistance is adjustable,with tunable parameters. In some embodiments, based on the determinedelectrical characteristic of the output of the inverter, the parametersof the emulated virtual resistance are adjusted. For example, if the THDof the output current is outside of a specification (e.g., greater thana threshold permitted percentage of THD), then the parameters of thevirtual resistance are adjusted to change the resistance value of thevirtual resistance to cause the output current to be within the THDspecification.

In some embodiments, the virtual resistance is multiplied by a currentdetermined to be passing through the capacitor of the LCL filter (eithervia measurement by a current sensor used to measure current passingthrough the capacitor, or via determination from other currentmeasurements). This voltage is then used as an input to a PWMcontroller. The PWM controller uses the voltage (virtual resistancemultiplied by current through capacitor of LCL filter) to determine aduty cycle. A set of switches is controlled according to the duty cycleto generate a square waveform (that will be filtered/smoothed by the LCLfilter).

The damping may also be dynamically adjusted (by adjusting theaforementioned tuning parameters) based on a determination of componentvariation, which may be due to the current passing through thecomponents or due to degradation over time, all of which may affect THD.For example, the inductance value for an inductor (or the capacitancevalue for a capacitor) is determined as a function of the currentdetermined to be passing through (or a voltage across) the component.The damping (e.g., emulated virtual resistance) is a function of theinductance of the capacitance values. The damping is adjusted to achievea desired THD by tuning the tunable parameters of the damping function,given the determined inductance and/or capacitance values.

As another example, to compensate for component degradation over time(e.g., due to age), the microcontroller accesses a lifetime model of theLCL components to determine, for a given age (e.g., measured from whenthe inverter was initialized or from manufacture date of components),the capacitance and inductance values of the capacitor and inductors ofthe LCL filter. Given the component values, the damping is adjusted toachieve a desired THD by updating the tunable parameters of the dampingfunction.

Described herein are embodiments of LCL filter damping. Using thetechniques described herein, the damping is dynamically adjustable. Thisis in contrast to existing damping techniques that are fixed. Thedynamically adjustable damping described herein allows for real-time,online control of damping to regulate for THD, component variation, etc.

Although the foregoing embodiments have been described in some detailfor purposes of clarity of understanding, the invention is not limitedto the details provided. There are many alternative ways of implementingthe invention. The disclosed embodiments are illustrative and notrestrictive.

What is claimed is:
 1. A power system, comprising: an invertercomprising an LCL filter, the LCL filter comprising a first inductor, acapacitor, and a second inductor; and a controller configured to:determine an electrical characteristic of an output of the inverter; andbased at least in part on the determined electrical characteristic ofthe output of the inverter, dynamically adjust damping of the LCLfilter, wherein the damping of the LCL filter is implemented at least inpart by emulating a virtual impedance in series with the capacitor ofthe LCL filter.
 2. The power system of claim 1, wherein the electricalcharacteristic of the output of the inverter comprises a measured TotalHarmonic Distortion (THD) of an output current of the inverter, andwherein the damping of the LCL filter is dynamically adjusted based atleast in part on the measured THD.
 3. The power system of claim 1,wherein the controller is further configured to determine an inductanceof the first inductor, and wherein the damping of the LCL filter isdynamically adjusted based at least in part on the determined inductanceof the first inductor.
 4. The power system of claim 3, wherein theinductance of the first inductor is determined as a function of currentpassing through the first inductor.
 5. The power system of claim 3,wherein the inductance of the first inductor is determined as a functionof an age of the first inductor.
 6. The power system of claim 5, whereinthe inductance of the first inductor is determined at least in part byaccessing a model of the first inductor, wherein the model indicatesinductance of the first inductor over a lifetime of the first inductor.7. The power system of claim 1, wherein the virtual impedance comprisesa set of tunable parameters, and wherein the virtual impedance isdynamically adjustable at least in part by updating at least oneparameter in the set of tunable parameters.
 8. The power system of claim1, wherein the damping of the LCL filter is adjusted based at least inpart on the virtual impedance applied to a current associated with thecapacitor.
 9. The power system of claim 1, wherein the damping of theLCL filter is adjusted at least in part by adjusting an input to a PWM(Pulse-Width Modulation) controller based at least in part on thedetermined electrical characteristic of the output of the inverter. 10.The power system of claim 9, wherein the PWM controller is configured todetermine a duty cycle, and wherein the duty cycle is based at least inpart on the determined electrical characteristic of the output of theinverter.
 11. The power system of claim 10, wherein the invertercomprises a set of switches, wherein the set of switches is used todetermine a square-waveform that is an input to the LCL filter, andwherein the set of switches is controlled based at least in part on thedetermined duty cycle.
 12. The power system of claim 11, wherein theduty cycle is further based at least in part on an output of one or morePR (Proportional-Resonant) controllers.
 13. The power system of claim 1,wherein the inverter is connected to a utility grid.
 14. The powersystem of claim 13, wherein the damping is comprised in an inner currentcontrol loop when the inverter is connected to the utility grid.
 15. Thepower system of claim 1, wherein the inverter is disconnected from autility grid.
 16. A method, comprising: determining an electricalcharacteristic of an output of an inverter, the inverter comprising anLCL filter, and the LCL filter comprising a first inductor, a capacitor,and a second inductor; and based at least in part on the determinedelectrical characteristic of the output of the inverter, dynamicallyadjusting damping of the LCL filter, wherein the damping of the LCLfilter is implemented at least in part by emulating a virtual impedancein series with the capacitor of the LCL filter.
 17. A power system,comprising: an inverter comprising an LCL filter, the LCL filtercomprising a first inductor, a capacitor, and a second inductor; and acontroller configured to: determine an electrical characteristic of anoutput of the inverter; determine an inductance of the first inductor,wherein the inductance of the first inductor is determined as a functionof an age of the first inductor; and based at least in part on thedetermined inductance of the first inductor and the determinedelectrical characteristic of the output of the inverter, dynamicallyadjust damping of the LCL filter.
 18. The power system of claim 17,wherein the electrical characteristic of the output of the invertercomprises a measured Total Harmonic Distortion (THD) of an outputcurrent of the inverter, and wherein the damping of the LCL filter isdynamically adjusted based at least in part on the measured THD.
 19. Thepower system of claim 17, wherein the inductance of the first inductoris determined at least in part by accessing a model of the firstinductor, wherein the model indicates inductance of the first inductorover a lifetime of the first inductor.
 20. The power system of claim 17,wherein the damping of the LCL filter is implemented at least in part byemulating a virtual impedance in series with the capacitor of the LCLfilter.
 21. The power system of claim 20, wherein the virtual impedancecomprises a set of tunable parameters, and wherein the virtual impedanceis dynamically adjustable at least in part by updating at least oneparameter in the set of tunable parameters.
 22. The power system ofclaim 20, wherein the damping of the LCL filter is adjusted based atleast in part on the virtual impedance applied to a current associatedwith the capacitor.
 23. The power system of claim 17, wherein thedamping of the LCL filter is adjusted at least in part by adjusting aninput to a PWM (Pulse-Width Modulation) controller based at least inpart on the determined electrical characteristic of the output of theinverter.
 24. The power system of claim 23, wherein the PWM controlleris configured to determine a duty cycle, and wherein the duty cycle isbased at least in part on the determined electrical characteristic ofthe output of the inverter.
 25. The power system of claim 24, whereinthe inverter comprises a set of switches, wherein the set of switches isused to determine a square-waveform that is an input to the LCL filter,and wherein the set of switches is controlled based at least in part onthe determined duty cycle.
 26. The power system of claim 25, wherein theduty cycle is further based at least in part on an output of one or morePR (Proportional-Resonant) controllers.
 27. The power system of claim17, wherein the inverter is connected to a utility grid.
 28. The powersystem of claim 27, wherein the damping is comprised in an inner currentcontrol loop when the inverter is connected to the utility grid.
 29. Thepower system of claim 17, wherein the inverter is disconnected from autility grid.
 30. A method, comprising: determining an electricalcharacteristic of an output of an inverter, the inverter comprising anLCL filter, and the LCL filter comprising a first inductor, a capacitor,and a second inductor; determining an inductance of the first inductor,wherein the inductance of the first inductor is determined as a functionof an age of the first inductor; and based at least in part on thedetermined inductance of the first inductor and the determinedelectrical characteristic of the output of the inverter, dynamicallyadjusting damping of the LCL filter.